def toDecimal(number):
    if number.startswith("0x"):
        number = int(number, 16)
    elif number.startswith("0"):
        number = int(number, 8)
    return str(number)